let app = getApp()
Component({
    properties: {
      followData: {
        type: Array,
        observer: function(newVal, oldVal) {
          this.updateRate()
        }
      },requestData: {
        type:Object,
        observer: function(newVal, oldVal) {
          this.update()
        }
      }
      },
      data:{
        loginShow:false
      },
    lifetimes: {
        attached: function () {
 
         }
      },
    methods: {
      getPopupData:function(e){
        var that=this
        wx.request({
          url: app.globalData.siteroot,
           data: {
             do:'Customer_follow',
             staff_id:wx.getStorageSync('staff_bind_id'),
             cus_id:that.data.requestData.cus_id,
             desc:e.detail
          },
         success: function(res) {
          that.triggerEvent('follow',1) 
          wx.showToast({
            title: '添加成功',
            icon: 'none',
            duration: 1500
          })
         }
      })
      },
      add_followOne:function(){
        var  popup={
          tit: "添加跟进记录",
          btn: [ "取消", "确认" ],
          flag: !0,
          x: !1
       }
       this.setData({
           popup:popup
       })
      },
      update:function(){
        var imgUrl=decodeURIComponent(this.data.requestData.imgUrl)
        this.setData({
          imgUrl:imgUrl
        })
      },
      updateRate:function(){}
    }
});
